#include<bits/stdc++.h>
using namespace std;


int a[5005][4999];

int len1 = 1;
int len2 = 1;

void add(int x, int y)
{
	int idx = x+1;
	int t = len2 + 1;
	for(int i = 1;i <= len2;i++)
	{
		a[idx][i] += a[x][i]+a[y][i];
		
		for(int j = i;j <= t;j++)
		{
			if(a[idx][j] >= 10)
			{
				a[idx][j+1] += a[idx][j]/10;
				a[idx][j] %= 10;
			}
			else
				break;
		}
	}
	len1 = len2 = t;
}

int main()
{
	int n;
	cin>>n;
	
	a[1][1] = 1;
	a[2][1] = 2;
	
	
	for(int i = 3;i <= n;i++)
		add(i-1, i-2);
	
	if(n < 6)
	{
		cout<<a[n][1];
		return 0;
	}
	
	int num = 5000;
	for(;a[n][num] == 0;num--);
	for(int i = num;i >= 1;i--)
		cout<<a[n][i];
    return 0;
}

